import request from '@/utils/request'

// 查询用户收藏帖子记录列表
export function listLikePosts(query) {
  return request({
    url: '/forum/likePosts/list',
    method: 'get',
    params: query
  })
}

// 查询用户收藏帖子记录详细
export function getLikePosts(favoriteId) {
  return request({
    url: '/forum/likePosts/' + favoriteId,
    method: 'get'
  })
}

// 新增用户收藏帖子记录
export function addLikePosts(data) {
  return request({
    url: '/forum/likePosts',
    method: 'post',
    data: data
  })
}

// 修改用户收藏帖子记录
export function updateLikePosts(data) {
  return request({
    url: '/forum/likePosts',
    method: 'put',
    data: data
  })
}

// 删除用户收藏帖子记录
export function delLikePosts(favoriteId) {
  return request({
    url: '/forum/likePosts/' + favoriteId,
    method: 'delete'
  })
}
